<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
selection_test(
  '<div contenteditable dir="rtl">|\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n ^Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-0 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n| Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n ^Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-1 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n |Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n ^Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-2 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n J|ust\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n J^ust\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-3 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Ju|st\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Ju^st\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-4 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Jus|t\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Jus^t\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-5 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just|\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just^\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-6 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n| <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>^testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-7 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>|testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>^testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-8 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>t|esting \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>t^esting \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-9 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>te|sting \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>te^sting \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-10 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>tes|ting \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>tes^ting \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-11 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>test|ing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>test^ing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-12 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testi|ng \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testi^ng \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-13 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testin|g \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testin^g \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-14 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing| \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing^ \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-15 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing |\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing ^\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-16 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8|\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8^\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-17 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>|\n \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>^\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-18 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n| \u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n ^\u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-19 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n |\u05D1\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n ^\u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-20 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1|\u05D5\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1^\u05D5\u05D3\u05E7|\n</div>',
  '14-21 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5|\u05D3\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5^\u05D3\u05E7|\n</div>',
  '14-22 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3|\u05E7\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3^\u05E7|\n</div>',
  '14-23 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-24 rtl left lineboundary');

selection_test(
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n|</div>',
  selection => selection.modify('extend', 'left', 'lineboundary'),
  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
  '14-25 rtl left lineboundary');
</script>
